package com.yange.accountbook.net;


import androidx.annotation.NonNull;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

/**
 * ClassName: BaseUrlManagerInterceptor
 * Description:  TODO
 * Author: zqc
 * Date: 2020/4/30 14:04
 */
public class BaseUrlManagerInterceptor implements Interceptor {
    // Retrofit初始化时候的url
    private String mOriginalBaseUrl;
    private String mNewBaseUrl;

    @Override
    public Response intercept(@NonNull Chain chain) throws IOException {
        Request oldRequest = chain.request();
        return chain.proceed(chain.request());
    }

    public void setOriginalBaseUrl(String originalBaseUrl) {
        mOriginalBaseUrl = originalBaseUrl;
    }

    public String getOriginalBaseUrl() {
        return mOriginalBaseUrl;
    }

    public String getNewBaseUrl() {
        return mNewBaseUrl;
    }

    public void setNewBaseUrl(String newBaseUrl) {
        mNewBaseUrl = newBaseUrl;
    }
}
